package com.heima.model.user.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author brianxia
 * @version 1.0
 * @date 2022-10-18 11:49
 */
@NoArgsConstructor
@Data
public class LoginVO {

    /**
     * user : {"id":"4","salt":"","name":"admin","password":"","phone":"13511223456","image":null,"sex":true,"certification":null,"identityAuthentication":null,"status":true,"flag":1,"createdTime":1585557392000}
     * token : eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAC2L0QqFIBAF_2WfEzY1tf5mw40MAmENisv991bo7Qxz5gdHK7BA8pk9O2sCxWR8mmZDuGXDiBjR8sYTwQCFGixjCJhwjjYOINeqtTzS-OxeRHHncvY3XVmJatXNd_3K0bleFnX-_wJQQYDGgAAAAA.hD1-NU7DkNaR2pUBUcEoTCLooBarZ8X02VY0PaULAp2pykrMWyvy2De071DbkjyA4THzxFaXyaWH0pKCjMDnTA
     */

    @JsonProperty("user")
    private UserDTO user;
    @JsonProperty("token")
    private String token;

    @NoArgsConstructor
    @Data
    public static class UserDTO {
        /**
         * id : 4
         * salt :
         * name : admin
         * password :
         * phone : 13511223456
         * image : null
         * sex : true
         * certification : null
         * identityAuthentication : null
         * status : true
         * flag : 1
         * createdTime : 1585557392000
         */

        @JsonProperty("id")
        private Integer id;
        @JsonProperty("name")
        private String name;
        @JsonProperty("phone")
        private String phone;
        @JsonProperty("image")
        private String image;
        @JsonProperty("sex")
        private Short sex;
        @JsonProperty("certification")
        private Boolean certification;
        @JsonProperty("identityAuthentication")
        private Boolean identityAuthentication;
        @JsonProperty("status")
        private Boolean status;
        @JsonProperty("flag")
        private Short flag;
    }
}
